import request from '@/config/axios'

export interface DirawingInventoryRecoveryVO {
  productCode: string
  productName: string
  grantNumber: number
  recoveryNumber: number
  remark: string
  dictRecoveryStatus: number
  grantName: string
  grantTime: Date
  recoveryName: string
  recoveryTime: Date
  creatorName: string
  updaterName: string
}

// 查询技术管理-图纸制作-图纸回收列表
export const getDirawingInventoryRecoveryPage = async (params) => {
  return await request.get({ url: `/technology/dirawing-inventory-recovery/page`, params })
}

// 查询技术管理-图纸制作-图纸回收详情
export const getDirawingInventoryRecovery = async (id: number) => {
  return await request.get({ url: `/technology/dirawing-inventory-recovery/get?id=` + id })
}

// 新增技术管理-图纸制作-图纸回收
export const createDirawingInventoryRecovery = async (data: DirawingInventoryRecoveryVO) => {
  return await request.post({ url: `/technology/dirawing-inventory-recovery/create`, data })
}

// 修改技术管理-图纸制作-图纸回收
export const updateDirawingInventoryRecovery = async (data: DirawingInventoryRecoveryVO) => {
  return await request.put({ url: `/technology/dirawing-inventory-recovery/update`, data })
}

// 回收技术管理-图纸制作-图纸回收
export const recoveryDirawingInventoryRecovery = async (data: DirawingInventoryRecoveryVO) => {
  return await request.put({ url: `technology/dirawing-inventory-recovery/recovery`, data })
}


// 删除技术管理-图纸制作-图纸回收
export const deleteDirawingInventoryRecovery = async (id: number) => {
  return await request.delete({ url: `/technology/dirawing-inventory-recovery/delete?id=` + id })
}

// 导出技术管理-图纸制作-图纸回收 Excel
export const exportDirawingInventoryRecovery = async (params) => {
  return await request.download({ url: `/technology/dirawing-inventory-recovery/export-excel`, params })
}

// 导出技术管理-图纸制作-产品下拉
export const productListDirawingInventoryRecovery = async (dto) => {
  return await request.get({ url: `/technology/dirawing-inventory-recovery/productList?dto=${dto}`})
}
